<script type="text/javascript" language="javascript">
   var http_request = false;
   function makePOSTRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      
      http_request.onreadystatechange = alertContents;
      http_request.open('POST', url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('myspan').innerHTML = result;            
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   function get(obj) {
      var poststr = "reply=" + encodeURI( document.getElementById("reply").value );
      makePOSTRequest('preview.php', poststr);
   }
</script>
<span name="myspan" id="myspan"></span>

{START_POSTFORM}
	<link href="{EDITOR_CSS}" rel="Stylesheet" type="text/css" />
	<script type="text/javascript" src="{EDITOR}"></script>
<form name="myForm" method="post" onsubmit="doCheck()" action="quote.php?f={F_ID}&t={T_ID}&p={P}&page=(PAGE)&pn={PN}&u={U_ID}">
{IF_SMILIES}&nbsp; &nbsp;<a href="JavaScript:doSmile(':)')"><img src="img/smilies/grin.gif" border="0" title=":)" /></a> 
<a href="JavaScript:doSmile(';-)')"><img src="img/smilies/wink.gif" border="0" title=";)" /></a> 
<a href="JavaScript:doSmile(':-p')"><img src="img/smilies/tongue.gif" border="0" title=":-p" /></a> 
<a href="JavaScript:doSmile(':-(')"><img src="img/smilies/sad.gif" border="0" title=":-(" /></a> 
<a href="JavaScript:doSmile(':-D')"><img src="img/smilies/laugh.gif" border="0" title=":-D" /></a> 
<a href="JavaScript:doSmile(':up:')"><img src="img/smilies/up.gif" border="0" title=":up:" /></a> 
<a href="JavaScript:doSmile(':up2:')"><img src="img/smilies/up2.gif" border="0" title=":up2:" /></a> 
<a href="JavaScript:doSmile(':shy:')"><img src="img/smilies/shy.gif" border="0" title=":shy:" /></a> 
<a href="JavaScript:More()">{MORE_SMILIES}</a>&nbsp; <input type="checkbox" name="dissmilies" value="on" />&nbsp;{DISABLE_SMILIES} &nbsp; <input type="checkbox" name="dissbb" value="on" />&nbsp;{DISABLE_BB} 
<div id="moresmilies" style="display: none;">
&nbsp; &nbsp;<a href="JavaScript:doSmile(':giggle:')"><img src="img/smilies/giggle.gif" border= "0" title=":giggle:" /></a> 
<a href="JavaScript:doSmile(';-D')"><img src="img/smilies/winking.gif" border= "0" title=":winking:" /></a> 
<a href="JavaScript:doSmile(':hi:')"><img src="img/smilies/hi.gif" border= "0" title=":hi:" /></a> 
<a href="JavaScript:doSmile(':-@')"><img src="img/smilies/evil.gif" border= "0" title=":evil:" /></a> 
<a href="JavaScript:doSmile('8-)')"><img src="img/smilies/nerdy.gif" border= "0" title=":nerdy:" /></a> 
<a href="JavaScript:doSmile(':nono:')"><img src="img/smilies/nono.gif" border= "0" title=":nono:" /></a> 
<a href="JavaScript:doSmile(':confused:')"><img src="img/smilies/confused.gif" border= "0" title=":confused:" /></a> 
<a href="JavaScript:doSmile(':sealed:')"><img src="img/smilies/sealed.gif" border= "0" title=":sealed:" /></a> 
<a href="JavaScript:doSmile(':love:')"><img src="img/smilies/heart.gif" border= "0" title=":love:" /></a> 
</div>{END_SMILIES}
<div class="richeditor">
		<div class="editbar">		
			<button title="bold" onclick="AddTag('b');" type="button" style="background-image:url('img/editor/text_bold.gif');"></button>
			<button title="italic" onclick="AddTag('i');" type="button" style="background-image:url('img/editor/text_italic.gif');"></button>
			<button title="underline" onclick="AddTag('u');" type="button" style="background-image:url('img/editor/text_underline.gif');"></button>
			<button title="strikethrough" onclick="AddTag('s');" type="button" style="background-image:url('img/editor/strikethrough.gif');"></button>
			<img src="./img/editor/separator.gif" align="absmiddle" />
			<button title="hyperlink" onclick="doLink();" type="button" style="background-image:url('img/editor/url.gif');"></button>
			<button title="image" onclick="doImage();" type="button" style="background-image:url('img/editor/img.gif');"></button>
			<img src="./img/editor/separator.gif" align="absmiddle" />
			<button title="big font" onclick="doSize('size=18','size');" type="button" style="background-image:url('img/editor/font_plus.gif');"></button>
			<button title="small font" onclick="doSize('size=9','size');" type="button" style="background-image:url('img/editor/font_minus.gif');"></button>
			<img src="./img/editor/separator.gif" align="absmiddle" />
			<button title="list" onclick="AddTag('li');" type="button" style="background-image:url('img/editor/icon_list.gif');"></button>
			<button title="align left" onclick="AddTag('left');" type="button" style="background-image:url('img/editor/text_align_left.gif');"></button>
			<button title="align center" onclick="AddTag('center');" type="button" style="background-image:url('img/editor/text_align_center.gif');"></button>
			<button title="align right" onclick="AddTag('right');" type="button" style="background-image:url('img/editor/text_align_right.gif');"></button>
			<button title="justify" onclick="AddTag('justify');" type="button" style="background-image:url('img/editor/text_align_justify.gif');"></button>
			<img src="./img/editor/separator.gif" align="absmiddle" />
			<button title="quote" onclick="AddTag('quote');" type="button" style="background-image:url('img/editor/icon_quote.png');"></button>
			<button title="code" onclick="AddTag('php');" type="button" style="background-image:url('img/editor/php.gif');"></button>
			<button title="color" onclick="showColorGrid2('none')" type="button" style="background-image:url('img/editor/colors.gif');"></button><span id="colorpicker201" class="colorpicker201"></span>
			<button title="spoiler" onclick="AddTag('spoiler');" type="button" style="background-image:url('img/editor/spoiler.gif');"></button>
			<button title="highlight text" onclick="AddTag('hl');" type="button" style="background-image:url('img/editor/highlight.gif');"></button>
			<button title="youtube" onclick="InsertYoutube();" type="button" style="background-image:url('img/editor/icon_youtube.gif');"></button>
			<img src="./img/editor/separator.gif" align="absmiddle" />
			<!--<button title="switch to source" type="button" onclick="javascript:SwitchEditor()" style="background-image:url('img/editor/icon_html.gif');"></button>-->
		</div>
<textarea class="reply" id="reply" name="reply" style="height:350px;width:785px;">{TEXT_POST}</textarea>
</div>
	<script type="text/javascript">
		//{WYSIWYG};
	</script><br />	&nbsp; &nbsp;<a href="./style/default/help_bbcode.html" target="_blank" title="BBCode help">BBCode?</a><br /><br />
<!-- BUTTONS -->
<table style="width:17%;margin-left:8px;">
<tr><td width="50%" >
<input type="submit" class="inputButton" value="(SUBMIT_REPLY)" />
<!-- END FIRST FORM (SUBMIT) -->
</form></td>
<td width="50%">
<form name="myForm2" method="post" action="javascript:get(document.getElementById('myform'));">
&nbsp;<input type="submit" class="inputButton" value="{PREVIEW}" />
</td></tr></table>

 <br /> 
</td></tr></table>